package com.spzx.product.api;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.product.api.domain.ProductSku;
import com.spzx.product.api.domain.DTO.SkuDTO;
import com.spzx.product.api.factory.RemoteProductSkuServiceFallbackFactory;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "RemoteProductSkuService"
        ,value = ServiceNameConstants.PRODUCT_SERVICE
        ,fallbackFactory = RemoteProductSkuServiceFallbackFactory.class)
public interface RemoteProductSkuService {
    @GetMapping("/product/skuList")
    @Operation(summary = "内部调用接口：分页查询商品列表")
    public R<List<ProductSku>> skuList(@RequestHeader(SecurityConstants.FROM_SOURCE) String s,@SpringQueryMap SkuDTO skuDTO);

}
